$(document).ready(function () {
    // alert($("#qqq").attr('href'))
    registerButton();
    // promptBox();
    // logoPrompt();
    // imgsPrompt();


});
function registerButton() {
    var array = [];
    var allInput = $("input"),
        name = $("input[id='username']"),
        pwd = $("input[id='pwd']"),
        pwdCon = $("input[id='con-pwd']"),
        str, //是否为物业学校
        community = $("select[name=community-judge]"), //社区
        companyName = $("input[id='company-name']"),  //学校名
        province = $("select[name=province]"),
        city = $("select[name=city]"),
        town = $("select[name=town]"),
        companyArea = $("input[id='company-area']"),
        peopleNum = $("select[name=peopleNum]"),
        companyType = $("select[name=companyType-judge]"),
        companyNature = $("select[name=companyNature-judge]"),
        companyIntro = $("#text-show-area"),  //文本输入域
        linkName = $("input[id='link-name']"),
        retail = $("input[id='retail']"),
        telephone = $("input[id='link-telephone']"),
        testPhone = $("input[id='phone-test']"),
        linkPost = $("input[id='link-postbox']"),
        accept;
    array.push(name,pwd,pwdCon,community,companyName,province,city,town,companyArea,peopleNum,
        province,companyType,companyNature,companyIntro,linkName,retail,telephone,testPhone,linkPost)





    $(".register-btn").click(function () {
        if($("#check-area1").is(':checked')){
            str = $("#check-area1").attr("value");
        }else if($("#check-area2").is(':checked')){
            str = $("#check-area2").attr("value");
        }else {
            str = null;}
        if($("#accept").is(':checked')){
            accept = $("#accept").attr("value");
        }
        else {
            accept = null;
        }
        for(var i =0;i<array.length;i++){

            if(array[i].val() === null||""){
                $("input[id='prompt-show-font']").val("请检查信息输入是否完整")
                $("#position-box").removeClass('hide')
                $("#prompt-box").removeClass('hide');
                return false
            }
            // console.log(array[i].val())
        }
    })
}
// function promptBox() {
//     $(".button-ok").click(function () {
//         $("#prompt-box").addClass('hide')
//         $("#position-box").addClass('hide')
//     })
// }

// function logoPrompt() {
//     $(".input-img-btn").click(function () {
//         if($("select[name=community-judge]").val() === null){
//             $("input[id='prompt-show-font']").val("请选择社区")
//             $("#position-box").removeClass('hide')
//             $("#prompt-box").removeClass('hide');
//             return false
//         }
//     })
// }
// function imgsPrompt() {
//     $(".file-path").click(function () {
//         if($("select[name=community-judge]").val() === null){
//             $("input[id='prompt-show-font']").val("请选择社区")
//             $("#position-box").removeClass('hide')
//             $("#prompt-box").removeClass('hide');
//             return false;
//         }
//     })
// }

